package com.mall.b2c.domain.order;

import java.math.BigDecimal;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.mall.b2c.domain.member.MemberDomain;
import com.mall.common.domain.BaseEntity;
import com.mall.common.enums.PayType;

/**
 * 付款凭证单
 */
@Entity
@Table(name = "b2c_vouchers")
public class VouchersDomain extends BaseEntity {

	private static final long serialVersionUID = 6315992295197675674L;

	private PayType payType; //付款类型
	private String paymentMethod; //付款方式
	private BigDecimal amount; //付款金额(包括:余额\现金)
	private BigDecimal deposit;// 使用余额
	private BigDecimal cash; // 使用现金
	private String operate; //操作人
	private String memo; //备注
	private MemberDomain member; //会员
	private OrderDomain order; //订单
	
	public PayType getPayType() {
		return payType;
	}

	public void setPayType(PayType payType) {
		this.payType = payType;
	}

	public String getPaymentMethod() {
		return paymentMethod;
	}

	public void setPaymentMethod(String paymentMethod) {
		this.paymentMethod = paymentMethod;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public String getOperate() {
		return operate;
	}

	public void setOperate(String operate) {
		this.operate = operate;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	@ManyToOne(fetch=FetchType.LAZY)
	public MemberDomain getMember() {
		return member;
	}

	public void setMember(MemberDomain member) {
		this.member = member;
	}

	@ManyToOne(fetch=FetchType.LAZY)
	public OrderDomain getOrder() {
		return order;
	}

	public void setOrder(OrderDomain order) {
		this.order = order;
	}

	public BigDecimal getDeposit() {
		return deposit;
	}

	public void setDeposit(BigDecimal deposit) {
		this.deposit = deposit;
	}

	public BigDecimal getCash() {
		return cash;
	}

	public void setCash(BigDecimal cash) {
		this.cash = cash;
	}

}
